import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/htwt-vss',
  },
  {
    path: '/htwt-vss',
    name: 'layout',
    redirect: '/layout/notice',
    component: () => import('@/pages/Layout/Layout.vue'), children: [
      {
        path: '/layout/notice',
        name: '公告详情',
        component: () => import('@/pages/components/Notice/Notice.vue'),
        meta: { id: 1, name: '公告详情', icon: '<bell-outlined/>' }
      },
      {
        path: '/layout/fastrecharge',
        name: '快速充值',
        component: () => import('@/pages/components/Fastrecharge/Fastrecharge.vue'),
        meta: { id: 2, name: '快速充值', icon: '' }
      },
      {
        path: '/layout/accounting',
        name: '会计明显',
        component: () => import('@/pages/components/Accounting/Accounting.vue'),
        meta: { id: 3, name: '会计明显', icon: '' }
      },
      {
        path: '/layout/mycard',
        name: 'mycard',
        redirect: '/layout/notice',
        component: () => import('@/pages/components/Mycard/Mycard.vue'),
        meta: {
          id: 4, name: '我的卡片', icon: ''
        },
        children: [
          {
            path: '/layout/mycard/applycard',
            name: '申请卡片',
            component: () => import('@/pages/components/Mycard/components/Applycard/Applycard.vue'),
            meta: { id: 41, name: "申请卡片" }
          },
          {
            path: '/layout/mycard/cardlist',
            name: '卡片列表',
            component: () => import('@/pages/components/Mycard/components/Cardlist/Cardlist.vue'),
            meta: { id: 42, name: "卡片列表" }
          },
          {
            path: '/layout/mycard/transaction',
            name: '交易记录',
            component: () => import('@/pages/components/Mycard/components/Transaction/Transaction.vue'),
            meta: { id: 43, name: "交易记录" }
          },
          {
            path: '/layout/mycard/label',
            name: '标签管理',
            component: () => import('@/pages/components/Mycard/components/Label/Label.vue'),
            meta: { id: 44, name: "标签管理" }
          },
          {
            path: '/layout/mycard/cardholder',
            name: '持卡人',
            component: () => import('@/pages/components/Mycard/components/Cardholder/Cardholder.vue'),
            meta: { id: 45, name: "持卡人" }
          }
        ]
      },
      {
        path: '/layout/personal',
        name: '个人中心',
        component: () => import('@/pages/components/Personal/Personal.vue'),
        meta: { id: 5, name: '个人中心', icon: '' }
      },
    ]
  },

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router